/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mygame.Object;

import com.jme3.export.InputCapsule;
import com.jme3.export.OutputCapsule;
import com.jme3.export.Savable;
import com.jme3.export.xml.XMLExporter;
import com.jme3.export.xml.XMLImporter;
import com.jme3.scene.Spatial;
import java.io.IOException;
import mygame.Manager;
import mygame.Scene.PlacementTriangle;

/**
 *
 * @author Mr.N0I3oDy
 */
public class Grabable extends GameObject {

    public Grabable(String name) {
        super(name);
    }

    @Override
    public void interact() {
        this.get3DModel().setLocalScale(this.get3DModel().getLocalScale().y - 0.1f);
        if (this.get3DModel().getLocalScale().y < 0.2f) {
            this.removeObject();
        }
        Manager.GetInstance().getPlayer().addRessource(this, this.amount);
    }
}
